#ifndef _LCD_H_
#define _LCD_H_

#include "stm32f4xx.h"

#define FLASH_ZIKU_ADDR(x)    ((x)*64*1024)
#define ZIKU_BASE_ADDR				FLASH_ZIKU_ADDR(100)
#define ASC16_BASE_ADDR       (ZIKU_BASE_ADDR + 0X00000000)
#define HZK16_BASE_ADDR       (ZIKU_BASE_ADDR + 0X00000806)
#define ASC32_BASE_ADDR       (ZIKU_BASE_ADDR + 0X0004064C)
#define HZK32_BASE_ADDR       (ZIKU_BASE_ADDR + 0X00042652)


#define LCD_BL_H  GPIO_WriteBit(GPIOB, GPIO_Pin_1, Bit_SET)
#define LCD_BL_L  GPIO_WriteBit(GPIOB, GPIO_Pin_1, Bit_RESET)

#define LCD_CS_H  GPIO_WriteBit(GPIOB, GPIO_Pin_12, Bit_SET)
#define LCD_CS_L  GPIO_WriteBit(GPIOB, GPIO_Pin_12, Bit_RESET)

#define LCD_DC_H  GPIO_WriteBit(GPIOB, GPIO_Pin_14, Bit_SET)
#define LCD_DC_L  GPIO_WriteBit(GPIOB, GPIO_Pin_14, Bit_RESET)

#define LCD_RESET_H  GPIO_WriteBit(GPIOB, GPIO_Pin_10, Bit_SET)
#define LCD_RESET_L  GPIO_WriteBit(GPIOB, GPIO_Pin_10, Bit_RESET)

void LCD_Init(void);
void LCD_Fill(u8 xs, u8 ys, u8 xe, u8 ye, u16 color);
u8 LCD_Display_Pic(u8 xs, u8 ys, u8* Buff);
void LCD_Display_ASCII(u8 xs, u8 ys, u8 size, u16 color, u8* Buff);
void LCD_Display_GB2312(u8 xs, u8 ys, u8 size, u16 color, u8* Buff);
void LCD_Disp_Str(u8 xs, u8 ys, u8 size, u16 color, u8* Buff);
void LCD_Display_Str_Flash(u8 xs,u8 ys,u8 size,u16 color,u8 *Buff);

#endif
